package network.internal.communication;

import java.io.IOException;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;

import javax.net.SocketFactory;

public class DefaultSocketFactory extends SocketFactory {

	@Override
	public Socket createSocket(final InetAddress host, final int port)
			throws IOException {
		return new Socket(host, port);
	}

	@Override
	public Socket createSocket(final InetAddress address, final int port,
			final InetAddress localAddress, final int localPort)
			throws IOException {
		return new Socket(address, port, localAddress, localPort);
	}

	@Override
	public Socket createSocket(final String host, final int port)
			throws IOException, UnknownHostException {
		return new Socket(host, port);
	}

	@Override
	public Socket createSocket(final String host, final int port,
			final InetAddress localHost, final int localPort)
			throws IOException, UnknownHostException {
		return new Socket(host, port, localHost, localPort);
	}
}
